﻿using log4net.Appender;
using log4net.Layout;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace mds.NoSqlDatabase
{
    public class NosqlLogService
    {
        private static NosqlLogService _instance = new NosqlLogService();

        public static NosqlLogService Instance
        {
            get { return _instance; }

        }
        private log4net.ILog _log;
        private NosqlLogService()
        {
            log4net.Config.XmlConfigurator.Configure(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"/bin/Log4net.Config"));
             _log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        }
        public void Log(String content,Exception err)
        {
            _log.Error(content, err);
        }
    }
}
